<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">

    @include('bend/common/js')

    <style>
        body {
            background-color: #fff;
        }
    </style>
</head>

<body>

<form id="lay-form" method="post" enctype="">
    <div class="layui-form" lay-filter="layuiadmin-form-admin" id="layuiadmin-form-admin"
         style="padding: 20px 30px 0 0;">
        <div class="layui-form-item">
            <label class="layui-form-label">学员姓名</label>
            <div class="layui-input-inline">
                <input type="text" name="person_name" lay-verify="username" placeholder="例：刘旭" autocomplete="off"
                       class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">手机号</label>
            <div class="layui-input-inline">
                <input type="text" name="mobile" lay-verify="phone" placeholder="11位数手机号" autocomplete="off"
                       class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">年龄</label>
            <div class="layui-input-inline">
                <input type="text" name="age" lay-verify="age" placeholder="例：11" autocomplete="off"
                       class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">性别</label>
            <div class="layui-input-inline">
                <select name="sex" style="width: 120px;display: inline;" class="layui-input">

                    <option value="0">请选择</option>

                    <option value="1">男</option>

                    <option value="2">女</option>

                </select>
            </div>
        </div>

        <div class="layui-form-item">
            <input type="button" class="form-submit" id="LAY-user-back-submit" value="确认">
        </div>
    </div>
</form>


<script>
    // 搜索
    $(".form-submit").on('click', function () {
        var formObj = $("#lay-form");

        formObj.action = "/bend/student/on-add"; //发送请求的路径
        formObj.method = "post";  //表单请求的方式
        formObj.attr('action', "/bend/student/on-add")

        //如果不设置上面的两个参数，默认提交触发该事件的表单
        formObj.submit();  //表单提交

        return false;
    })

</script>
</body>
</html>
